<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/6/29 0029
 * Time: 14:13
 */

namespace app\model\model;


class Backup extends Base
{
    /**
     * 添加一条
     * */
    public function addOne($data){
        return $this->save($data);
    }
    /**
     * 获取备份列表
     * */
    public function getList($where,$li){
        return $this->where($where)->order("id asc")->paginate($li);
    }
    /**
     * 获取一条
     * */
    public function getOne($id){
        return $this->where(['id'=>$id])->find();
    }
    /**
     * 删除一条
     * */
    public function delOne($id){
        return $this->where(['id'=>$id])->delete();
    }
    public function delAll($id){
        return $this->where('id','in',$id)->delete();
    }
}